﻿namespace FallingWordsGame
{
    using System;

    class Program
    {
        public static bool SoundOn;

        static void Main()
        {
            Console.CursorVisible = false;

            int height = Console.BufferHeight = Console.WindowHeight = 30;
            int widhth = Console.BufferWidth = Console.WindowWidth = 80;

            var keyboard = new Keyboard();

            var game = new Engine(keyboard, height, widhth);
            var manager = new GameManager(keyboard);

            keyboard.SpacePressed += (sender, eventInfo) =>
            {
                game.OnSpacePressed();
            };

            keyboard.ArrowPressed += (sender, eventInfo) =>
            {
                manager.OnArrowPress((sender as Keyboard).pressedKey.Key);
            };

            manager.Run();
            
            game.Start();
        }

        
    }
}
